package com.boomsecret.pattern.factory.abstractMethod;

import com.boomsecret.pattern.factory.abstractFactory.NYPizzaIngredientFactory;
import com.boomsecret.pattern.factory.abstractFactory.PizzaIngredientFactory;
import com.boomsecret.pattern.factory.abstractFactory.SeattlePizzaIngredientFactory;

/**
 * Created by wangjinliang on 2018/1/31.
 */
public class FactoryMethodPatternDemo {
    public static void main(String[] args) {
        PizzaIngredientFactory nyFactory = new NYPizzaIngredientFactory();
        PizzaIngredientFactory seattleFactory = new SeattlePizzaIngredientFactory();

        PizzaStore pizzaStore = new NYPizzaStore();
        pizzaStore.orderPizza(seattleFactory);

        pizzaStore.orderPizza(nyFactory);
    }
}
